<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Hero War:  Fichier source de C:/Documents and Settings/israhal17/Bureau/devel/HeroWar/include/gfx/ImgAnim.h</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css">
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Généré par Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="../../index.html"><span>Page&nbsp;principale</span></a></li>
      <li><a href="../../namespaces.html"><span>Espaces&nbsp;de&nbsp;nommage</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Fichiers</span></a></li>
      <li><a href="../../examples.html"><span>Exemples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="../../files.html"><span>Liste&nbsp;des&nbsp;fichiers</span></a></li>
    </ul>
  </div>
<h1>C:/Documents and Settings/israhal17/Bureau/devel/HeroWar/include/gfx/ImgAnim.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef IMGANIM_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define IMGANIM_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;SFML/Graphics.hpp&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;gfx/Anim.h&gt;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="keyword">namespace </span>gfx
<a name="l00008"></a>00008 {
<a name="l00009"></a>00009 
<a name="l00015"></a><a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html">00015</a> <span class="keyword">class </span><a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html" title="Comme Anim à la diférence près que la classe utilise une image avec tout les sprites...">ImgAnim</a> :
<a name="l00016"></a>00016         <span class="keyword">public</span> <a class="code" href="../../df/d6a/classgfx_1_1_anim.html" title="Implémente la gestion des animation selon le temps.">Anim</a>, <span class="keyword">public</span> sf::Sprite
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018 <span class="keyword">public</span>:
<a name="l00025"></a>00025         <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#7f9c8ad96a5c009a6a60dbc81f957add">ImgAnim</a>(<span class="keyword">const</span> sf::Image &amp;Img, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;nbFrame, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;line=1,
<a name="l00026"></a>00026                         <span class="keyword">const</span> sf::Vector2f &amp;Position=sf::Vector2f(0, 0),
<a name="l00027"></a>00027                         <span class="keyword">const</span> sf::Vector2f &amp;Scale=sf::Vector2f(1, 1), <span class="keywordtype">float</span> Rotation=0.f,
<a name="l00028"></a>00028                         <span class="keyword">const</span> sf::Color &amp;Col=sf::Color(255, 255, 255, 255));
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00032"></a>00032         <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#5f3aaaa888f1e83d6f939cf52aedcd99" title="Définis les dimension d&amp;#39;un frame.">setFrameDim</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;w, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;h);
<a name="l00033"></a>00033 
<a name="l00035"></a>00035         sf::IntRect <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#9bcde71eeb5da2e150bc3b551af4a9b5" title="Retourne la dimension d&amp;#39;un frame.">frameDim</a>() <span class="keyword">const</span>;
<a name="l00036"></a>00036 
<a name="l00038"></a>00038         <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#c3d685bce91a02f70cb80f11c96e6803" title="Définis le décalage de l&amp;#39;animation sur l&amp;#39;image (permet d&amp;#39;avoir plusieurs...">setOffset</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;x, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;y);
<a name="l00039"></a>00039 
<a name="l00041"></a>00041         sf::IntRect <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#d98466fff76ebcf53e4fb0f37a5ba9eb" title="Retourne un rectangle avec l&amp;#39;offset.">offset</a>() <span class="keyword">const</span>;
<a name="l00042"></a>00042 
<a name="l00044"></a>00044         <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#6945d2f1b47a330401704e178b6b6b08" title="Définis la ligne animé courante.">setAnimRow</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;row);
<a name="l00045"></a>00045 
<a name="l00047"></a>00047         <span class="keywordtype">int</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#715e923e35861d35a3f856b21c1204dd" title="Retourne la ligne animé courante.">animRow</a>() <span class="keyword">const</span>;
<a name="l00048"></a>00048 
<a name="l00050"></a>00050         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#dbbce9a3fcd0ff52240c4267c165c611" title="Définis le frame courant.">setFrame</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;count);
<a name="l00051"></a>00051 
<a name="l00053"></a>00053         <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#c9a586f105bd86bf8aca8f2f60a99b6c" title="Met à jour le rectangle d&amp;#39;animation.">refreshSubRect</a>();
<a name="l00054"></a>00054 
<a name="l00056"></a>00056         <span class="keywordtype">void</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#7c69734b4fc8c084216301bc36b05fc7" title="Définis le nombre de frame dans l&amp;#39;animation.">setSize</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;size);
<a name="l00057"></a>00057 
<a name="l00059"></a>00059         <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="../../d8/d31/classgfx_1_1_img_anim.html#30ea08ced2ffec5c21eb44b99b58c998" title="Retourne le nombre de frame.">getSize</a>() <span class="keyword">const</span>;
<a name="l00060"></a>00060 <span class="keyword">protected</span>:
<a name="l00061"></a>00061         <span class="keyword">virtual</span> <span class="keywordtype">void</span> Render(sf::RenderTarget&amp; Target) <span class="keyword">const</span>;
<a name="l00062"></a>00062 
<a name="l00063"></a>00063 <span class="keyword">private</span>:
<a name="l00065"></a>00065         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_size;
<a name="l00067"></a>00067         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_animRow;
<a name="l00069"></a>00069         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_xOffset;
<a name="l00071"></a>00071         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_yOffset;
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 }
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Généré le Wed Feb 4 02:28:38 2009 pour Hero War par&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
